<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="shiro"  uri="http://shiro.apache.org/tags" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>系统管理</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="robots" content="all,follow">
  </head>
  <style>
    .col-md-2{
      padding: 0;
    }
    .modular{
      font-size: 25px;
      /*font-weight: bold;*/
      color: white;
    }
    .name{
      height: 40px;
      line-height: 40px;
      float: left;
      width: 100px;
      font-size: 18px;
    }
    .form-group{
      margin-bottom: 5px;
    }
    .col-md-3{
      padding: 0;
    }
    .col-md-2{
      padding: 0;
    }
    .userMsg{
      width: 60%;
      position: relative;
      left: 19%;
      top: 10px;
      margin-bottom: 0px;
    }
    .layui-form-select dl dd.layui-this{
      background-color: #b4b3f5;
    }
  </style>
  <body>
  <div class="page">
    <!-- Main Navbar-->
    <jsp:include page="header.jsp"></jsp:include>
    <div class="page-content d-flex align-items-stretch">
      <!-- Side Navbar -->
      <jsp:include page="left.jsp"></jsp:include>
      <div class="content-inner" style="background-color: white">
        <!-- Page Header-->
        <header class="page-header">
          <div class="container-fluid">
            <h2 class="no-margin-bottom">系统管理</h2>
          </div>
        </header>
        <div class="content-box" style="background-color: white;height: 95%;">
          <div class="col-md-12" style="border: 1px #ddd solid">
            <div class="col-md-12" style="padding: 0;margin: 10px 0 10px 0;line-height: 40px;">
              <!--<a class="btn green Printing" id="print-click" style="float: right;margin-left: 10px;margin-top: 3px">导出Excel</a>-->
              <!--<button class="btn green Printing" onclick="printout()" style="float: right;margin-top: 3px">打印列表</button>-->
              <shiro:hasPermission name="user:list">
                <a href="/system/userPage"><button type="button"  class="layui-btn layui-btn-normal layui-btn-radius">用户管理</button></a>
              </shiro:hasPermission>
              <shiro:hasPermission name="role:list">
                <a href="/system/rolePage"><button type="button" class="layui-btn layui-btn-radius">角色管理</button></a>
              </shiro:hasPermission>
              <shiro:hasPermission name="resource:list">
                <a href="/system/resourcePage"> <button type="button" class="layui-btn layui-btn-warm layui-btn-radius">资源管理</button></a>
              </shiro:hasPermission>
              <shiro:hasPermission name="resource:add">
                <button type="button" onclick="resourceAddView();" class="layui-btn layui-btn-radius" style="position: relative;left: 65%">添加资源</button>
              </shiro:hasPermission>
            </div>
            <div class="col-md-12" style="min-height: 600px;;margin-bottom: 15px;" >
              <div class="row">
                <table class="layui-hide" id="LAY_table_user" lay-filter="user"></table>
                <script type="text/html" id="barDemo">
                  <a class="layui-btn layui-btn-xs red"  lay-filter="user" id="modify" lay-event="modify" style="color: white;background-color: #ffb822;">修改信息</a>
                </script>
              </div>
            </div>
          </div>
        </div>
        <div class="tab-pane" id="modify_resource" style="display: none">
          <form class="layui-form layui-form-pane" lay-filter="example" id="userModifyForm" action="">
            <div class="layui-form-item userMsg" style="display: none">
              <label class="layui-form-label" style="background-color: #b4b3f5;color: white">资源标识</label>
              <div class="layui-input-block">
                <input type="text" id="modify_resourceId"  name="modify_resourceId" autocomplete="off"  value="" class="layui-input">
              </div>
            </div>
            <div class="layui-form-item userMsg" >
              <label class="layui-form-label" style="background-color: #b4b3f5;color: white">资源名称</label>
              <div class="layui-input-block">
                <input type="text" id="modify_name" name="modify_name" autocomplete="off"  class="layui-input">
              </div>
            </div>

            <div class="layui-form-item userMsg" >
              <label class="layui-form-label" style="background-color: #b4b3f5;color: white">字符串表示</label>
              <div class="layui-input-block">
                <input type="text" id="modify_permission" name="modify_permission" autocomplete="off"  class="layui-input">
              </div>
            </div>
            <div class="layui-form-item userMsg" >
              <label class="layui-form-label" style="background-color: #b4b3f5;color: white">资源URL</label>
              <div class="layui-input-block">
                <input type="text" id="modify_url" name="modify_url" autocomplete="off"  class="layui-input">
              </div>
            </div>
            <div class="layui-form-item userMsg" style="top: 30px">
              <div class="layui-input-block">
                <button type="button" class="layui-btn" onclick="modifyResource();">立即提交</button>
              </div>
            </div>
          </form>
        </div>
        <div class="tab-pane" id="add_resource" style="display: none">
          <form class="layui-form layui-form-pane" lay-filter="example"  action="">
            <div class="layui-form-item userMsg" >
              <label class="layui-form-label" style="background-color: #b4b3f5;color: white">资源名称</label>
              <div class="layui-input-block">
                <input type="text" id="add_name" name="add_name" autocomplete="off"  class="layui-input">
              </div>
            </div>

            <div class="layui-form-item userMsg" >
              <label class="layui-form-label" style="background-color: #b4b3f5;color: white">字符串表示</label>
              <div class="layui-input-block">
                <input type="text" id="add_permission" name="add_permission" autocomplete="off"  class="layui-input">
              </div>
            </div>
            <div class="layui-form-item userMsg" >
              <label class="layui-form-label" style="background-color: #b4b3f5;color: white">资源URL</label>
              <div class="layui-input-block">
                <input type="text" id="add_url" name="add_url" autocomplete="off"  class="layui-input">
              </div>
            </div>
            <div class="layui-form-item userMsg" style="top: 30px">
              <div class="layui-input-block">
                <button type="button" class="layui-btn" onclick="addResource();">添加</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
              </div>
            </div>
          </form>
        </div>
        <!-- Page Footer-->
        <jsp:include page="footer.jsp"></jsp:include>
      </div>
    </div>
  </div>

    <!-- Main File-->
  <script>
    $("#system-menu").addClass('active');
  </script>
  <!--   Core JS Files   -->
  <script src="${pageContext.request.contextPath}/base/plugins/layui-v2.4.3/layui/excel.js"></script>
  <script src="${pageContext.request.contextPath}/base/plugins/layui-v2.4.3/FileSaver.js"></script>
  <script src="${pageContext.request.contextPath}/base/plugins/layui-v2.4.3/jszip.js"></script>
  <script src="${pageContext.request.contextPath}/base/plugins/layui-v2.4.3/xlsx.js"></script>
  <script src="${pageContext.request.contextPath}/js/resource.js"></script>
  <script>
    layui.use('form', function(){
      var form = layui.form;

    });
  </script>
  </body>
</html>